/**
 * 
 */
package com.designpattern.design.composite;

/**
 * @author zhangyang
 *
 */
public  abstract class AbsResourceTree {

	/**
	 * 菜单id
	 */
	private Long id;
	
	/**
	 * 上级菜单id
	 */
	private Long parantId;
	/**
	 * 资源名称
	 */
	private String resName;
	
	/**
	 * 资源编码
	 */
	private String resCode;
	
	/**
	 * 资源描述
	 */
	private String resDesc;
	
	/**
	 * 资源地址
	 */
	private String resUrl;
	
	/**
	 * 资源类型 1-系统 2一级菜单 3二级菜单 4api接口
	 */
	private String resType;
	
	/**
	 * 资源序列-同级别排序顺序
	 */
	private Integer seqNum;
	
	private String icon;
	
	/**
	 * 是否叶节点 false不是叶节点 true为叶节点
	 */
	private boolean isLeaf;

	/**
	 * 修改菜单方法
	 * @param tree
	 * @return
	 */
	public AbsResourceTree add(AbsResourceTree tree) {
		return tree;
	}
	
	/**
	 * 移除菜单方法
	 * @param tree
	 */
	public void remove(AbsResourceTree tree) {
		
	}
	
	/**
	 * 修改菜单属性方法
	 * @param tree
	 * @return
	 */
	public AbsResourceTree update(AbsResourceTree tree) {
		return tree;
	}
	/**
	 * 打印方法-所有节点都需要
	 */
	public abstract void print();
	


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getParantId() {
		return parantId;
	}

	public void setParantId(Long parantId) {
		this.parantId = parantId;
	}

	public String getResName() {
		return resName;
	}

	public void setResName(String resName) {
		this.resName = resName;
	}

	public String getResCode() {
		return resCode;
	}

	public void setResCode(String resCode) {
		this.resCode = resCode;
	}

	public String getResDesc() {
		return resDesc;
	}

	public void setResDesc(String resDesc) {
		this.resDesc = resDesc;
	}

	public String getResUrl() {
		return resUrl;
	}

	public void setResUrl(String resUrl) {
		this.resUrl = resUrl;
	}

	public String getResType() {
		return resType;
	}

	public void setResType(String resType) {
		this.resType = resType;
	}

	public Integer getSeqNum() {
		return seqNum;
	}

	public void setSeqNum(Integer seqNum) {
		this.seqNum = seqNum;
	}

	
	public String getIcon() {
		return icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public boolean isLeaf() {
		return isLeaf;
	}

	public void setLeaf(boolean isLeaf) {
		this.isLeaf = isLeaf;
	}
	
	
}
